
<div class="box box-solid">
    <div class="box-body table-responsive ">
    <div class="box-header">
    <div class="box-tools">
    <div >
        <form role="form" action="/admin/user/carrylist" method="get">
            <div class="input-group">


                    <label class="pull-right">
                        <input type="text" name="name" class="form-control input-sm " style="width: 150px;" placeholder="姓名" value=<?php echo $filter['name'];?> >
                    </label>

                    <label class="pull-right">
                        <input type="text" name="mobile" class="form-control input-sm " style="width: 150px;" placeholder="账号" value=<?php echo $filter['mobile'];?> >
                    </label>

                    <input type="hidden" name="page" value="1"/>
                    <div class="input-group-btn">
                        <button class="btn btn-sm btn-primary"  >搜索<i class="fa fa-search"></i></button>
                        <a href="/admin/user/carrylist" class="btn btn-sm btn-default">清空条件</a>
                    </div>

            </div>
        </form>
    </div>
    </div>
</div>


        <table class="table table-hover table-bordered">

            <tr>
                <th>账号</th>
                <th>认证类型</th>
                <th>认证名</th>
                <th>车辆数</th>
                <th>常用路线</th>
                <th>是否中锦指定承运人</th>
                <th>状态</th>
                <th class="align-center">操作</th>
            </tr>
   <?php if(!empty($user)){ ?>
      <?php foreach ($user['data'] as $key => $value) { ?>
        <tr>
            <td><?php if(!empty($value['user_mobile'])) echo $value['user_mobile'];else echo '';?></td>
            <td>
            <?php if($value['type']==3): ?>
                个人承运人
            <?php elseif($value['type']==4):?>
                企业承运人
            <?php endif; ?>
                
            </td>
            <td><?php if(!empty($value['name'])) echo $value['name'];else echo '';?></td>
            <td>
                <?php echo  $value['car_num_text']; ?>
                <a  href="<?php echo $this->createUrl('usercar/list/sid/'.$value['user_sid']); ?>">查看</a>
            </td>
            <td>
                <?php echo  $value['route_num_text']; ?>
                <a  href="<?php echo $this->createUrl('route/list/sid/'.$value['user_sid']); ?>">查看</a>
            </td>
            <td><?php if($value['is_authorized']==0)echo'否';else echo '<b style="color:green">是</b>';?></td>
            <td><?php 
            if($value['status']==1)echo '<b class="label label-success">正常</b>';
            if($value['status']==2)echo '<b class="label label-danger">已禁用</b>';
            ?></td>
            <td class="align-center tool-bar">
                <?php if (1 == 1) : ?>
                     <a  target="_blank" href="<?php echo $this->createUrl('user/info/sid/'.$value['user_sid']); ?>">详情</a>
                     <?php if($value['is_authorized']==0):?>
                    <a href="<?php echo $this->createUrl('user/setisauthorized/sid/'.$value['user_sid']);?>">指定为中锦合作方</a>
                    <?php else:?>
                    <a onclick="return confirm('确定要禁用吗？');" href="<?php echo $this->createUrl('user/setisauthorized/sid/'.$value['user_sid']);?>"><b style="color:red">取消中锦合作方身份</b></a>
                    <?php endif;?>
                <?php endif; ?>
            </td>
        </tr>
            <?php }?>
        <?php }?>
        </table>
    </div>
    <div class="box-footer clearfix">

    <?php if(!empty($user['data'])): ?>
        <?php $this->widget('BLinkPager', array('pages'=>$user['pager'])); ?>
    <?php endif; ?>

    </div>

</div>
